<?php
	include_once "quangcao_db.php";
	
	class quangcao_bs
	{
		//--------------Field---------------
		private $MaQuangCao = 0;
		public function SetMaQuangCao($MaQuangCao)   { $this->MaQuangCao = $MaQuangCao;    }
		public function GetMaQuangCao()              { return $this->MaQuangCao;           }
		
		private $TenQuangCao = "";
		public function SetTenQuangCao($TenQuangCao) { $this->TenQuangCao = $TenQuangCao;  }
		public function GetTenQuangCao()             { return $this->TenQuangCao;          }
		
		private $HinhAnh = "";
		public function SetHinhAnh($HinhAnh)         { $this->HinhAnh = $HinhAnh;          }
		public function GetHinhAnh()                 { return $this->HinhAnh;              }
		
		private $Link = "";
		public function SetLink($Link)               { $this->Link = $Link;                }
		public function GetLink()                    { return $this->Link;                 }
		
		private $MaTrangThai = -1;
		public function SetMaTrangThai($MaTrangThai) { $this->MaTrangThai = $MaTrangThai;  }
		public function GetMaTrangThai()             { return $this->MaTrangThai;          }
		
		private $NgayHetHan = "0000-00-00";
		public function SetNgayHetHan($NgayHetHan)   { $this->NgayHetHan = $NgayHetHan;    }
		public function GetNgayHetHan()              { return $this->NgayHetHan;           }
		
		private $ViTri = -1;
		public function SetViTri($ViTri)             { $this->ViTri = $ViTri;              }
		public function GetViTri()                   { return $this->ViTri;                }
		
		private $PIN = "";
		public function SetPIN($PIN)                 { $this->PIN = $PIN;                  }
		public function GetPIN()                     { return $this->PIN;                  }
		
		
		//--------------Method---------------
		public function Them()
		{
			$data = new quangcao_db();
			return $data->Them($this->TenQuangCao, $this->HinhAnh, $this->Link, $this->MaTrangThai, $this->NgayHetHan, $this->ViTri, $this->PIN);
		}
		
		public function CapNhat()
		{
			$data = new quangcao_db();
			return $data->CapNhat($this->MaQuangCao, $this->TenQuangCao, $this->HinhAnh, $this->Link, $this->MaTrangThai, $this->NgayHetHan, $this->ViTri, $this->PIN);
		}
		public function CapNhatTrangThai()
		{
			$data = new quangcao_db();
			return $data->CapNhatTrangThai($this->MaQuangCao, $this->MaTrangThai);
		}
		
		public function CapNhatPIN()
		{
			$data = new quangcao_db();
			return $data->CapNhatPIN($this->MaQuangCao, $this->PIN);
		}
		public function Xoa()
		{
			$data = new quangcao_db();
			return $data->Xoa($this->MaQuangCao);
		}
		
		public function LayDanhSach()
		{
			$data = new quangcao_db();
			return $data->LayDanhSach($this->MaQuangCao, $this->TenQuangCao, $this->HinhAnh, $this->Link, $this->MaTrangThai, $this->NgayHetHan, $this->ViTri);
		}
	}
?>